#if MSC_VER >=1000
    #pragma execution_character_set("UTF-8")
#endif

#ifndef EASTSEARCHSONG_H
#define EASTSEARCHSONG_H
#include<QString>
#include <QNetworkAccessManager>
#include<QNetworkReply>

#include<QObject>
// 进行网络搜索的歌曲
class EastSearchSong :public QObject
{
    Q_OBJECT
public:
    EastSearchSong(QObject *parent = 0);

    // get
    void gSearch(QString url, int type );
    // post
    void pSearch(QString url, int type);
    // 下载歌曲
    void gDownload(QString url, QString path);
    private:
   QString url;
   QNetworkAccessManager *manager = new QNetworkAccessManager;

private slots:
   void ex(QNetworkReply *reply,int type);

   void exError(QNetworkReply::NetworkError code);

signals:
   void shasData(const QString & text,int type);

};

#endif // EASTSEARCHSONG_H
